<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/12/16
 * Time: 16:11
 */
header("Content-type: text/html; charset=utf-8");
include('./aes.php');
session_start();
$josndata = $_POST['jsondata'];
//var_dump($josndata);die;
$aes = new aes();
// 解密
$user = $aes->AesDecrypt($josndata,'2b4334b053e06f37');
//iconv("UTF-8", "GB2312//IGNORE", $user);
//$user = json_decode(substr($user, 3));
//$user = explode('}',$user);
$num =  strrpos($user,'}');
$str = substr($user,0,$num+1);
$arr = json_decode($str,true);
$_SESSION['wx_user'] = $arr;
header("location: http://huamu.cqnews.net/index.php?s=/Home/Index");
